package com.doubi.model.sys;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 系统操作日志
 *
 * @author MrDoubi
 * @since 2019-10-26
 */
@Data
@Accessors(chain = true)
@TableName("t_sys_log")
@EqualsAndHashCode(callSuper = true)
public class TSysLog extends Model<TSysLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "oper_id", type = IdType.UUID)

    private String operId;

    @Override
    protected Serializable pkVal() {
//        return operId;
        return this.operId;
    }



    /**
     * 标题
     */
    @TableField("title")

    private String title;


    /**
     * 方法
     */
    @TableField("method")

    private String method;


    /**
     * 操作人
     */
    @TableField("oper_name")

    private String operName;


    /**
     * 操作地址
     */
    @TableField("oper_url")

    private String operUrl;


    /**
     * ip
     */
    @TableField("oper_ip")

    private String operIp;


    /**
     * ip地址
     */
    @TableField("oper_location")

    private String operLocation;


    /**
     * 请求参数
     */
    @TableField("oper_param")

    private String operParam;


    /**
     * 0正常 -1 报错了
     */
    @TableField("status")

    private String status;


    /**
     * 错误信息
     */
    @TableField("error_msg")

    private String errorMsg;


    /**
     * 请求时间
     */
    @TableField("oper_time")

    private Date operTime;


}